#!/bin/sh
dir="/etc/storage/"
user="201631062325"
passwd="221970"

#logout
logout(){

wget -qP $dir --post-data="action=logout&username=$user@yd&password=$passwd&ac_id=1&ajax=1" http://172.16.245.50/include/auth_action.php
res=`cat $dir/auth_action.php`
rm -f $dir/auth_action.php
if [ "$res" == "网络已断开" ]; then
	logger -t "edu logout:" "$res"
	echo $res 
	sleep 5
	/etc/storage/login.sh
else
	echo $res
	logger -t "edu logout" "$res"
fi
}

logout
